package com.org.khtn.gui;

import javax.swing.ImageIcon;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;

public class MyPopupMenu extends JPopupMenu{
	public JMenuItem makeNavigationMenuItem(String menuItemText, String imageName, String actionCommand) {
        String imgLocation = "res/images/" + imageName + ".gif";
        
        JMenuItem menuItem = new JMenuItem(menuItemText);
        menuItem.setActionCommand(actionCommand);
        menuItem.setIcon(new ImageIcon(imgLocation));
        return menuItem;
    }
}
